package com.wangan.wanganpush.dao;

import com.wangan.wanganpush.model.UserLogin;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public  interface LoginDao extends JpaRepository<UserLogin,Integer> {

    //根据flag字段查询出未发送的数据
    @Query(value = "SELECT * from wangan_user_login a where a.flag = ?1 limit 0,1000;", nativeQuery = true)
    List<UserLogin>  findAllByFlag(int flag);

}
